Namespace Kardex
Public Class OrdenCompraProducto
	Inherits Auditoria.Transaccion

	Private vOrdenCompraProductoId As Integer = -1
	Private vProductoId As Integer = -1
	Private vProductoNombre As string =""
	Private vCantidad As Integer = -1
	Private vPrecioUnitario As Double = 0.0
	Private vSubTotal As Double = 0.0
	Private vIgv_porcentaje As Double = 0.0
	Private vIgv As Double = 0.0
	Private vTotal As Double = 0.0

	Public Property OrdenCompraProductoId() As Integer
		Get
			Return vOrdenCompraProductoId
		End Get
		Set(ByVal Value As Integer)
			vOrdenCompraProductoId = Value
		End Set
	End Property

	Public Property ProductoId() As Integer
		Get
			Return vProductoId
		End Get
		Set(ByVal Value As Integer)
			vProductoId = Value
		End Set
	End Property

	Public Property ProductoNombre() as string
		Get
			Return vProductoNombre
		End Get
		Set(ByVal Value As string)
			vProductoNombre = Value
		End Set
	End Property

	Public Property Cantidad() As Integer
		Get
			Return vCantidad
		End Get
		Set(ByVal Value As Integer)
			vCantidad = Value
		End Set
	End Property

	Public Property PrecioUnitario() As Double
		Get
			Return vPrecioUnitario
		End Get
		Set(ByVal Value As Double)
			vPrecioUnitario = Value
		End Set
	End Property

	Public Property SubTotal() As Double
		Get
			Return vSubTotal
		End Get
		Set(ByVal Value As Double)
			vSubTotal = Value
		End Set
	End Property

	Public Property Igv_porcentaje() As Double
		Get
			Return vIgv_porcentaje
		End Get
		Set(ByVal Value As Double)
			vIgv_porcentaje = Value
		End Set
	End Property

	Public Property Igv() As Double
		Get
			Return vIgv
		End Get
		Set(ByVal Value As Double)
			vIgv = Value
		End Set
	End Property

	Public Property Total() As Double
		Get
			Return vTotal
		End Get
		Set(ByVal Value As Double)
			vTotal = Value
		End Set
	End Property

	Sub New()
	End Sub

	Sub New(ByRef OrdenCompraProductoId As Integer, ByVal ProductoId As Integer, ByVal Cantidad As Integer, ByVal PrecioUnitario As Double, ByVal SubTotal As Double, ByVal igv_porcentaje As Double, ByVal igv As Double, ByVal total As Double)
		vOrdenCompraProductoId = OrdenCompraProductoId
		vProductoId = ProductoId
		vCantidad = Cantidad
		vPrecioUnitario = PrecioUnitario
		vSubTotal = SubTotal
		vIgv_porcentaje = Igv_porcentaje
		vIgv = Igv
		vTotal = Total
	End Sub

End Class



 Public Class OrdenCompraProductoCol   
 Inherits System.Collections.CollectionBase
Private _enmSortDirection As SortDirection
Public Sub New()
_enmSortDirection = SortDirection.Asc
End Sub
Public Sub Sort(ByVal sortExpression As String, ByVal sortDirection As SortDirection)
InnerList.Sort(New Comparer(sortExpression, SortDirection))
End Sub
Public Sub Sort(ByVal sortExpression As String)
InnerList.Sort(New Comparer(sortExpression, _enmSortDirection))
If _enmSortDirection = SortDirection.Asc Then
_enmSortDirection = SortDirection.Desc
Else
_enmSortDirection = SortDirection.Asc
End If
End Sub
Public Function Add(ByVal obj As OrdenCompraProducto) As Integer
Return MyBase.List.Add(obj)
End Function
Public Sub AddPrimero(ByVal obj As OrdenCompraProducto)
MyBase.List.Insert(0, obj)
End Sub
Public ReadOnly Property OrdenCompraProducto(ByVal Index As Integer) As OrdenCompraProducto
Get
Return CType(MyBase.List(Index), OrdenCompraProducto)
End Get
End Property
End Class
end namespace

